package com.hex.ds.hdtp.core.inf.metadata.service.impl;

import com.hex.ds.hdtp.core.inf.metadata.converter.IDmSqlResultMapper;
import com.hex.ds.hdtp.core.inf.metadata.entity.TableFieldsEntity;
import com.hex.ds.hdtp.core.inf.metadata.repository.ISourceConfInfoRepository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * @Package com.hex.ds.hdtp.core.inf.metadata.service.impl
 * @ClassName DmMethodService
 * @Description DM8元数据管理服务
 * @Author gj.xu
 * @Date 2024/2/4 18:26
 * @Version v2.0
 **/
@Slf4j
@Service("DM")
public class DmMethodService extends AbstractORDBMSMethodService {

    private final IDmSqlResultMapper dmSqlResultMapper;

    public DmMethodService(ISourceConfInfoRepository sourceConfInfoRepository, IDmSqlResultMapper dmSqlResultMapper) {
        super(sourceConfInfoRepository);
        this.dmSqlResultMapper = dmSqlResultMapper;
    }

    @Override
    protected TableFieldsEntity toTableFieldsBean(Map<String, String> tableFieldsMap) {
        return dmSqlResultMapper.toTableFieldsBean(tableFieldsMap);
    }

}
